#pragma once

#include <Eigen/Dense>
#include "eigen/linear.h"

namespace  ldl_eigen
{
class PositionDecayLinear : public Linear
{
public:
    PositionDecayLinear(int64_t d, int64_t h, int64_t width, int64_t height);
    virtual ~PositionDecayLinear() = default;

    /**
     * @brief 更新权重和偏置
     */
    virtual void update() override;

    const Eigen::MatrixXf& weights_deacy();

private:
    float distance(Eigen::Vector2f a, Eigen::Vector2f b);
private:
    int64_t m_width{};
    int64_t m_height{};
    Eigen::MatrixXf m_weights_deacy{};
};
}
